<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>人脸识别后台管理-注册</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="lib/layui-v2.5.5/css/layui.css" media="all">
    <link rel="stylesheet" href="css/registerLogin.css" >
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-container">
    <div class="admin-login-background">
        <div class="layui-form login-form">
            <div class="layui-logo"><img src="images/logo.png" width="80px" style="margin-left: 30px"/><span
                    style="font-size: 30px; margin-left: 20px">贵州宇豪科技</span></div>
            <form class="layui-form" action="">
                <div class="layui-form-item logo-title">
                    <h1>人脸识别后台管理-注册账号</h1>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-block">
                        <input type="password" name="password" lay-verify="required" placeholder="请输入用户名"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">密码</label>
                    <div class="layui-input-block">
                        <input type="password" name="password" lay-verify="required|password" placeholder="请输入密码"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <button class="layui-btn btn layui-btn-fluid" lay-submit="" lay-filter="regist">注册</button>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
<script src="lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
<script src="lib/jq-module/jquery.particleground.min.js" charset="utf-8"></script>
<script>
    layui.use(['form'], function () {
        var form = layui.form,
            layer = layui.layer;

        // 登录过期的时候，跳出ifram框架
        if (top.location !== self.location) top.location = self.location;

        // 粒子线条背景
        $(document).ready(function () {
            $('.layui-container').particleground({
                dotColor: '#5cbdaa',
                lineColor: '#5cbdaa'
            });
        });

        // 进行登录操作
        form.on('submit(regist)', function (data) {
            data = data.field;
            console.log(data);
                // $.post("face/regist", {
                //     "username" : data.field.username,
                //     "password" : data.field.password
                // },  function(data) {
                //     if(data.status === 200){
                //         layer.msg('注册成功', function () {
                //             window.location = 'index.html';
                //         });
                //     }
                // });
            layer.msg('注册成功', function () {
                window.location = 'login.html';
            });
            return false;
        });
    });
</script>
</body>
</html>